package cn.ml.gaoJi.api.jueDuiZhi;


import java.util.Scanner;

/*绝对值 Math.abs(a[i]);
 * 负数则返回1,输入的是有序数组
 */
public class Jue {


    public static void main(String[] args) {
        int min = 0;
        Scanner input = new Scanner(System.in);
        System.out.println("请输入五个随机数");
        int[] a = new int[5];
        for(int i=0;i<5;i++){
            a[i]=input.nextInt();
        }
        for(int j=0;j<5;j++){
            int abs = Math.abs(a[j]);
            System.out.println(abs);
            min = Math.abs(a[j]);
            if(min>abs){
                min=Math.abs(a[j+1]);
            }
        }
        System.out.println("输入的最小值为："+min);





    }
}
